<%-- 
    Document   : show_account_statement
    Created on : Sep 20, 2012, 4:33:18 PM
    Author     : faizal.azlee
--%>

<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Pidahan Simpanan</title>
        <script type="text/javascript">
            $(document).ready(function(){
                $('form').submit( function () {
                    return formValidation();
                });                
            });
            
             if(typeof String.prototype.trim !== 'function') {
                                String.prototype.trim = function() {
                                  return this.replace(/^\s+|\s+$/g, ''); 
                    }
                  }
            
            function popupWin(amount, akaun, noKp, akaunDari, noKpDari){
                var url = '${pageContext.request.contextPath}/tac?generateFundTranferTac&amount='+amount
                        +'&noAkaun='+akaun+'&noKp='+noKp+'&akaunDari='+akaunDari+'&noKpDari='+noKpDari;
                popupWindow = window.open(
                url,'popUpWindow',
                'height=450,width=630,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
            }
            
            function validate(f)
            {
                if(document.getElementById("tac").value.trim().length<1)
                    {
                        alert("Sila Masukkan nombor TAC")
                        return false;
                    }                
                else 
                    {
                        blockUI();
                        f.action="${pageContext.request.contextPath}/deposit/transfer?Transfer_Step3";
                        f.submit();
                    }                    
            }
        </script>
    </head>
    <body>
        <s:form action="/deposit/transfer" class="niceform">
            <s:errors/>
            <s:hidden name="deposit.noKp" id="noKp"></s:hidden> 
            <s:hidden name="deposit.noAkaun" id="noAkaun"></s:hidden>
            <s:hidden name="deposit.amaun" id="damaun"/>
            <s:hidden name="deposit.noKpDari" id="noKpDari"/>
            <s:hidden name="deposit.noAkaunDari" id="noAkaunDari"/>
            <s:hidden name="deposit.nama" id="nama"></s:hidden>
            <s:hidden name="deposit.namaPenerima" id="namaPenerima"></s:hidden>
            <s:hidden name="deposit.noAkaunPenerima" id="noAkaunPenerima"></s:hidden>
            <s:hidden name="deposit.balanceAmaun" id="balanceAmaun"></s:hidden>
            <div id="content">
                <div id="logo">
                    <span>
                        <img src="${pageContext.request.contextPath}/images/img/ribbon.png"/>               
                    </span>
                </div>
                <h3>
                    Pindahan Simpanan
                </h3> 
                    
                <p>
                    <label>Dari Akaun TH :</label>${actionBean.deposit.noAkaunDari}&nbsp;
                </p>
                
                <p>
                    <label>Nama :</label>${actionBean.deposit.nama}&nbsp; 
               </p>
                <p>
                    <label>Ke Akaun TH :</label>${actionBean.deposit.noAkaunPenerima}&nbsp;                    
                </p>
                <p>
                    <label>Nama :</label>${actionBean.deposit.namaPenerima}&nbsp;                   
                </p>
                <p>
                    <label>Jumlah (RM) :</label><fmt:formatNumber value="${actionBean.deposit.amaun}" pattern="#,###.00"/> &nbsp;                 
                </p>
                <p>
                    <label>Kod Pengesahan Transaksi :</label>
                        <s:password name="deposit.tacNumber" maxlength="6" size="10" id="tac"/>&nbsp;
                </p>
                <br/>
                <p>
                    Transaksi ini memerlukan Kod Pengesahan Transaksi(TAC). 
                    Sila klik <a href="JavaScript:popupWin('${actionBean.deposit.amaun}','${actionBean.deposit.noAkaun}','${actionBean.deposit.noKp}','${actionBean.deposit.noAkaunDari}','${actionBean.deposit.noKpDari}')" >
                        Kod Pengesahan Transaksi(TAC)</a>untuk mendapatkan kod tersebut.
                </p>    
                <br/>
                <p align="center">
                    <s:submit name="showMainForm" value="Laman Utama" class="button green"/>
                    <s:button name="Step3" value="Seterusnya" class="button green" onclick="validate(this.form)"/>
                </p>   
            </div
        </s:form>
    </body>
</html>
